package com.xmtlxx.tms.mapper;

import com.xmtlxx.common.core.mapper.BaseMapperPlus;
import com.xmtlxx.tms.domain.Carrier;
import com.xmtlxx.tms.domain.bo.CarrierBo;
import com.xmtlxx.tms.domain.vo.CarrierVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 承运商Mapper接口
 *
 * @author xmtlxx
 * @date 2022-08-15
 */
public interface CarrierMapper extends BaseMapperPlus<CarrierMapper, Carrier, CarrierVo> {
    /**
     * 根据条件分页查询承运商
     *
     * @param carrier 承运商
     * @return Page Carrier
     */
//    @DataPermission({
//        @DataColumn(key = "tenantName", value = "c.create_by"),
//        @DataColumn(key = "deptName", value = "c.dept_id"),
//        @DataColumn(key = "userName", value = "c.create_by")
//    })
    Page<CarrierVo> selectPageCarrierList(@Param("page") Page<Carrier> page,@Param("carrier") CarrierBo carrier);

    /**
     * 查询承运商列表
     *
     * @param carrier 承运商
     * @return 承运商集合
     */
//    @DataPermission({
//        @DataColumn(key = "tenantName", value = "c.create_by"),
//        @DataColumn(key = "deptName", value = "c.dept_id"),
//        @DataColumn(key = "userName", value = "c.create_by")
//    })
    List<CarrierVo> selectCarrierList(@Param("carrier") CarrierBo carrier);

    CarrierVo selectCarrierVoByID(String id);
}
